#include<stdio.h>
void minmax(int a[], int len, int *max, int *min);
int main(void){
	int a[]={1,23,4,5,6,7,8,9,1,2,4,7,58,48};
	int min,max;
	minmax(a,sizeof(a)/sizeof(a[0]),&max,&min);
	printf("min=%d,max=%d",min,max);
	return 0;
}
void minmax(int a[], int len, int *max, int *min){
	int i;
	*min=*max=a[0];
	for(i=0;i<len;i++){
		if(a[i]<*min){
			*min=a[i];
		}
		if(a[i]>*max){
			*max=a[i];
		}
	}
}
